package com.meilai.project.controller.web.report.mapper;

import com.meilai.project.controller.web.report.entity.BuildingLockCount;
import com.meilai.project.controller.web.report.entity.BuildingTotalCount;
import com.meilai.project.controller.web.report.entity.DrawRateSummaryLockCount;
import com.meilai.project.controller.web.report.entity.DrawRateSummaryTotalCount;
import com.meilai.project.controller.web.report.vo.DrawRateDetailCommonItemVO;
import com.meilai.project.controller.web.report.vo.DrawRateDetailElevatorItemVO;
import com.meilai.project.controller.web.report.vo.DrawRateDetailGasStationItemVO;
import com.meilai.project.entity.business.building.BuildingAreaAudienceRelation;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDate;
import java.util.List;

/**
 * @author xchen
 * @since 2022-04-12
 */
@Mapper
public interface DrawRateReportMapper {

	List<DrawRateSummaryTotalCount> queryDrawRateSummaryTotalCount();

	List<DrawRateSummaryLockCount> queryDrawRateSummaryLockCount(
			@Param("start_date") LocalDate start_date,
			@Param("end_date") LocalDate end_date
	);

	List<DrawRateSummaryTotalCount> queryDrawRateSummaryAreaTotalCount();

	List<DrawRateSummaryLockCount> queryDrawRateSummaryAreaLockCount(
			@Param("start_date") LocalDate start_date,
			@Param("end_date") LocalDate end_date
	);

	List<DrawRateDetailElevatorItemVO> queryDrawRateDetailElevatorItemTotalCountList();

	List<BuildingAreaAudienceRelation> queryDrawRateDetailElevatorRelationList();

	List<DrawRateDetailCommonItemVO> queryDrawRateDetailCommon(
			@Param("media_type_id") Integer media_type_id,
			@Param("adcode") String adcode
	);

	List<BuildingLockCount> queryDrawRateDetailCommonLockCount(
			@Param("media_type_id") Integer media_type_id,
			@Param("start_date") LocalDate start_date,
			@Param("end_date") LocalDate end_date,
			@Param("adcode") String adcode
	);

	List<DrawRateDetailGasStationItemVO> queryDrawRateDetailGasStation();

	List<BuildingTotalCount> queryDrawRateDetailGasStationTypeCount();

	List<BuildingLockCount> queryDrawRateDetailGasStationLockCount(
			@Param("start_date") LocalDate start_date,
			@Param("end_date") LocalDate end_date
	);
}
